<div id="content" >

<?php foreach($types as $gg => $type) { ?>

			<div class="group1"  <?php if($gg != 0) { ?>style="margin-top: 20px"<?php } ?>>
				<div class="box_search">
					<form action="<?php echo $this->Html->url(array('action' => 'category', $type['Type']['id'])); ?>" method="POST" id="filter_index_<?php echo $type['Type']['id'] ?>">
						<div class="detail_search">
							<p class="key_title"><?php echo $type['Type']['name'] ?></p>
							
							<div class="select_box">

								<input type="text" name="filter_keyword" value="" class="keyword" />
								<select onchange="$('#filter_index_<?php echo $type['Type']['id'] ?>').submit();" name="filter_city_id">
								    <option value="all"><?php __('Tỉnh/Thành'); ?></option>
								    <?php foreach($cities as $c ) {
									$selected = "";
									if($c["City"]["id"] == $city_id)
									{
									    $selected = 'selected="selected"';
									}
								    ?>
									<option value="<?php echo $c["City"]["id"] ?>" <?php echo $selected; ?> ><?php echo $c["City"]["name"] ?></option>
								    <?php } ?>
								</select>
								<select onchange="$('#filter_index_<?php echo $type['Type']['id'] ?>').submit();" name="filter_district_id" id="ProjectinfoDistrictId">
								    <option value="all">- <?php __('Quận/Huyện'); ?> -</option>
								    <?php foreach($districts as $d ) {
									$selected = "";
									if($d["District"]["id"] == $district_id)
									{
									    $selected = 'selected="selected"';
									}
								    ?>
									<option value="<?php echo $d["District"]["id"] ?>" <?php echo $selected; ?> ><?php echo $d["District"]["name"] ?></option>
								    <?php } ?>
								</select>
								<select onchange="$('#filter_index_<?php echo $type['Type']['id'] ?>').submit();" name="filter_career_id" id="ProjectinfoCareerId">
								    <option value="all">- <?php __('Ngành nghề'); ?> -</option>
								    <?php foreach($careers as $ca ) {
									$selected = "";
									if($ca["Career"]["id"] == $career_id)
									{
									    $selected = 'selected="selected"';
									}
								    ?>
									<option value="<?php echo $ca["Career"]["id"] ?>" <?php echo $selected; ?> ><?php echo $ca["Career"]["name"] ?></option>
								    <?php } ?>
								</select>
							</div><!--end select_box-->
						</div><!-- end detail_search-->
					</form>

				</div><!--end box_search-->					
									
<?php //echo $this->element('gtdangbai'); ?>
				<div class="table_list">

					<table id="ncdt" width="100%" cellspacing="0" cellpadding="0" border="0">
						<tr class="title">
							<td>Thông tin</td>
							<td>Địa điểm</td>
							<td>Thể loại</td>
							<td>Ngành nghề</td>
						
							<td>Lượt xem</td>
							<td>Ngày đăng</td>
						</tr>
						<?php foreach($type['products'] as $k => $item) {
							$class = $k%2 == 0 ? "odd" : "even" ;
						?>
									<tr class="<?php echo $class; ?>">
										<td><?php echo $this->Html->link(__($item["Projectinfo"]["name"], true), array('action' => 'view', $item['Projectinfo']['id'])); ?></td>

			
										<td><?php echo $item["City"]["name"] ?></td>
										<td><a href="<?php echo $this->Html->url(array('controller'=>'projectinfos', 'action'=>'category', $item["Type"]["id"])); ?>"><?php echo $item["Type"]["name"] ?></a></td>
										<td><?php echo $item["Career"]["name"] ?></td>
										<td><?php echo $item["Projectinfo"]["hit"] ?></td>
										<td><?php echo date('d/m/Y', strtotime($item["Projectinfo"]["create_date"])); ?></td>
									</tr>
						<?php } ?>
						
					</table>
					<p class="read_more"><a href="<?php echo $this->Html->url(array('action' => 'category', $type['Type']['id'])); ?>">Xem thêm >></a></p>

				</div><!--end table_list-->				
			</div><!--end group-->
			

<?php } ?>			
			
			

			<div id="metadataz" class="containerz" style="display: none;">
						<?php foreach($Projectinfos_vip as $k => $item) {
							
						?>
									<div class="post">
												<?php if($item["Projectinfo"]["image"]) { ?><div class="image"><a href="<?php echo $this->Html->url(array('action' => 'view', $item['Projectinfo']['id'])) ?>"><img src="<?php echo $item["Projectinfo"]["image"] ?>" width="192" height="133" alt="" /></a></div> <?php } ?>
												<h2><?php echo $this->Html->link(__($item["Projectinfo"]["name"], true), array('action' => 'view', $item['Projectinfo']['id'])); ?></h2>
												<?php echo $item["Projectinfo"]["description"] ?>
												<p class="more"><a href="<?php echo $this->Html->url(array('action' => 'view', $item['Projectinfo']['id'])) ?>">Xem thêm >></a></p>
									</div>
									<img  class="line_dai" src="<?php echo $this->Html->url('/img/line_dai.jpg'); ?>" alt="" />
						<?php } ?>
				
				
				
				
			</div><!--end metadata-->
			
			<script type="text/javascript">
			$(function(){
				$('#metadata').html($('#metadataz').html());
			});
						
			</script>
                        